# json字符串转化  json.loads(s)
# json格式文件转换 json.load(fd)

import json

json_str = '[{"provinceName":"美国","provinceShortName":"","cityName":"","currentConfirmedCount":3969613,"confirmedCount":6724667,"confirmedCountRank":1,"suspectedCount":0,"curedCount":2556465,"deadCount":198589,"deadCountRank":1,"deadRate":"2.95","deadRateRank":59,"comment":"","sort":0,"operator":"fuyanjia","locationId":971002,"countryShortCode":"USA","countryFullName":"United States of America","statisticsData":"https://file1.dxycdn.com/2020/0315/553/3402160512808052518-135.json","incrVo":{"currentConfirmedIncr":-7697,"confirmedIncr":8590,"curedIncr":16131,"deadIncr":156},"showRank":true}]'
print(type(json_str))
python_list = json.loads(json_str)
print(type(python_list))
print(type(python_list[0]))
print(python_list)


with open('test.json') as f:
    python_list = json.load(f)
    print(type(python_list))
    print(type(python_list[0]))
    print(python_list)
